package pattern12.overtime;

/**
 * 休息的状态
 * @author wdl
 */
public class SleepingState implements IState {
    @Override
    public void writeProgram(Work work) {
        if (work.getHour()<21){
            System.out.println("当前时间"+work.getHour()+",加班工作");
        }else {
            System.out.println("当前时间"+work.getHour()+",工作没做完，但是必须回去休息了");
        }
    }
}
